package com.ghpt.service.impl;
import com.ghpt.mapper.FuelMapper;
import com.ghpt.pojo.Fuel;
import com.ghpt.service.FuelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FuelServiceImpl implements FuelService {
    @Autowired
    private FuelMapper fuelMapper;

    @Override
    public Fuel findFuelById(Long id) {
        if (id != null) {
            return fuelMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(Fuel fuel) {
        return fuelMapper.updateById(fuel);//更新成功为1否则为0
    }
}
